cmake_minimum_required(VERSION 2.8.12)
project(demo)
option(ENABLE_INT8 "use int8" OFF)
option(ENABLE_AVX2 "use avx2" OFF)
option(ENABLE_NEON "whether use neon, if use arm please set it on" OFF)

if(ENABLE_INT8)
	message("using int8")
	add_definitions(-D_ENABLE_INT8)
endif()

if(ENABLE_AVX2)
	message("using av2")
	add_definitions(-D_ENABLE_AVX2)
endif()

if(ENABLE_NEON)
	message("using arm")
	add_definitions(-D_ENABLE_NEON)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") 
if(WIN32)
	set(OpenCV_DIR "D:/opencv343/build")
endif()
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS})
include_directories(src)
AUX_SOURCE_DIRECTORY(src LIB_SRC)
AUX_SOURCE_DIRECTORY(example EXAMPLE_SRC)
add_executable(demo ${LIB_SRC} ${EXAMPLE_SRC})
target_link_libraries(demo ${OpenCV_LIBS} )
